package com.qianyu.project.mapper;

import com.qianyu.project.entity.SubcontractPayment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qianyu.project.mapper.provider.SubSettleProvider;
import com.qianyu.project.mapper.provider.SubcontractPaymentProvider;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 分包付款 Mapper 接口
 * </p>
 *
 * @author gs
 * @since 2021-01-30
 */
@Repository
public interface SubcontractPaymentMapper extends BaseMapper<SubcontractPayment> {
    @Select("select max(fk_id) from subcontract_payment where year(update_date)=year(curdate())")
    String selectMaxCode();
    @SelectProvider(method = "getSubcontracts",type = SubcontractPaymentProvider.class )
    List<SubcontractPayment> getSubcontracts(Map<String, Object> map);
}
